﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ContractLibrary;

namespace Server
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Server starting...");
            try
            {
                ServiceHost duplexServiceHost = new ServiceHost(typeof(Server));
                duplexServiceHost.AddServiceEndpoint(typeof(IContractServer), new NetTcpBinding(SecurityMode.None), "net.tcp://pc-florian:9080/DataService");
                duplexServiceHost.Open();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            finally
            {
                Console.ReadLine();
            }



        }
    }
}
